package daiwei.javaWeb.exam.meta;

import java.io.UnsupportedEncodingException;

public class Product {
	 
	 private int id;
	  private String price;
	  private String title;
	  private String image;
	  private String summary;
	  private String detail;
	  private boolean isBuy = false;
	  private boolean isSell = false;
	  
	public Product( double price, String title, String image, String summary, String text) {
		this.price = Double.toString(price);
		this.title = title;
		this.image = image;
		this.summary = summary;
		this.detail = text;
	}
	
	public Product() {
		
	}
	 
	  public int getId() {
		return id;
	  }
	  public boolean isIsBuy() {
		return isBuy;
	}
	public void setIsBuy(boolean isBuy) {
		this.isBuy = isBuy;
	}
	public boolean getIsSell() {
		return isSell;
	}
	public void setIsSell(boolean isSell) {
		this.isSell = isSell;
	}
	public void setId(int id) {
		this.id = id;
	  }
	  public String getPrice() {
		return price;
		  }
		  public void setPrice(double price) {
			this.price = Double.toString(price/100);
		}
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
		public String getImage() {
			return image;
		}
		public void setImage(String image) {
			this.image = image;
		}
		public String getSummary() {
			return summary;
		}
		public void setSummary(String summary) {
			this.summary = summary;
		}
		public String getDetail() {
			return detail;
		}
		public void setText(String detail) throws UnsupportedEncodingException {
			this.detail = detail;
		} 
}
